float4x4 world;
float4x4 view;
float4x4 projection;

texture diffuseTexture;
sampler diffuseTextureSampler = sampler_state
{
	Texture = <diffuseTexture>;
	MinFilter = linear;
	MagFilter = linear;
	MipFilter = linear;
};

struct VertexInput
{
	float4 position : POSITION0;
	float3 normal : NORMAL;
	float2 uv : TEXCOORD0;
};

struct VertexOutput
{
	float4 position : POSITION0;
	float2 uv : TEXCOORD0;
};

VertexOutput vs_main(VertexInput input)
{
	VertexOutput output;
	
	float4 worldPosition = mul(input.position, world);
	float4 viewPosition = mul(worldPosition, view);
	output.position = mul(viewPosition, projection);
	
	output.uv = input.uv;
	
	return output;
}

float4 ps_main(VertexOutput input) : COLOR0
{
	return tex2D(diffuseTextureSampler, input.uv);
	//return 1;
}

technique SimpleTexture
{
	pass Pass1
	{
		VertexShader = compile vs_1_1 vs_main();
		PixelShader = compile ps_2_0 ps_main();
	}
}
	